/**
 * Created with  SublimeText
 * @Author:      Lyle
 * @DateTime:    2017-08-15 14:20:33
 * @Description: slider tip
 */

import globalMixin from './globalMixin'

var sliderPartMixin = {

    mixins: [globalMixin],

    methods: {

        sliderPartMixin_photos() {
            let html = '<div class="sliderTip">' +
                '<div class="content_center">' +
                '<p>Interested in this user?</p>' +
                '<button type="button" class="btn btn-yellow btnSendMessage clickCallback sliderTipClose"> Send a message </button>' +
                '</div>' +
                '</div>';
            return html;
        },

        sliderPartMixin_askPhoto(obj) {
            let html = '<div class="sliderTip"><div class="noPhoto" style="background-image:url(' +
                this.getAvatar(obj.account.gender) + ')"><div class="ask_photo sliderTipClose">';
            if (obj.status.requested_photo && !obj.status.photo_hidden_reason) {
                html += '<span class="sent">' + this.language.userProfile_requestSent + '</span>';
            } else {
                if (obj.status.photo_hidden_reason) {
                    html += '<span class="main_color clickCallback "> ' + this.language.userProfile_photoPrivacyTips[obj.status.photo_hidden_reason]; + '</span>'
                } else {
                    html += '<span class="main_color clickCallback "> ' + this.language.userProfile_askPhoto + '</span>'
                }
            }
            html += '</div></div></div>';
            return html;
        },

        sliderPartMixin_privatePhotosPermission(obj, bgStyle) {
            let html = '<div class="sliderTip"><div class="filter"><div class="filterBg" style="' + bgStyle + '"></div><div class="content_center sliderTipClose"><div>';
            if (obj.status.requsted_private_album) {
                html += '<p>' + this.language.userProfile_requestdPhotoTps + '</p><button type="button" class="btn requested">' + this.language.userProfile_requestdPhotoBtnText + '</button>';
            } else {
                html += '<p>' + this.language.userProfile_requestPhotoTps + '</p><button type="button" class="btn clickCallback ">' + this.language.userProfile_requestPhotoBtnText + '</button>';
            }
            html += '</div></div></div></div>';
            return html;
        },


    }

}

export default sliderPartMixin;
